#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QToolButton>
#include <QLineEdit>
#include <QUrl>
#include <QLabel>
#include <QProgressBar>
#include <QWebHistory>
#include <QShortcut>

#include <QMessageBox>

#include "linkchecker.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::MainWindow *ui;
    QToolButton *tbtnBack;
    QToolButton *tbtnGo;
    QLineEdit *lineAddress;
    QLabel *labelHint;
    QProgressBar *progressBar;

    bool isLoadFinished;

protected slots:
    void onTbtnBackClicked();
    void onTbtnGoClicked();
    void onPageLoadFinished(bool success);
    void onLinkClicked(const QUrl &url);
    void onLinkHovered(const QString &link, const QString &title, const QString &textContent);
};

#endif // MAINWINDOW_H
